home *** CD-ROM | disk | FTP | other *** search
- ** This message occurs for each step in the simulation.
- on simulate
- {
- conOut = amplitude*(randomreal()-0.5)+meanValue;
-
- ** sysGlobal2 is the file reference number for the DEBUG TRACE
- if( sysGlobal2 != 0.0 ) ** 0 is error, check for open file for TRACE
- {
- // template for report: |BLOCK NAME *****************|block number |BLOCK NUMBER*******
- fileWrite(sysGlobal2,"Noise Generator block number "+(MyBlockNumber())+". Current Time:"+currentTime+".","",True);
- if(getBlockLabel(myBlockNumber()) != "")
- fileWrite(sysGlobal2,"Block Label: "+getBlockLabel(myBlockNumber()),"",True);
- fileWrite(sysGlobal2," Output = "+ConOut,"",True);
- fileWrite(sysGlobal2," ","",True);
- }
- }
-
- on endSim
- {
- ** sysGlobal1 is the file reference number for the TEXT REPORT
- if( sysGlobal1 != 0.0 ) ** 0 is error, check for open file for REPORT
- {
- // template for report: |BLOCK NAME *****************|block number |BLOCK NUMBER*******
- fileWrite(sysGlobal1,"Noise Generator block number "+(MyBlockNumber()),"",True);
- if(getBlockLabel(myBlockNumber()) != "")
- fileWrite(sysGlobal1,"Block Label: "+getBlockLabel(myBlockNumber()),"",True);
- fileWrite(sysGlobal1," Amplitude, pp max = "+amplitude,"",True);
- fileWrite(sysGlobal1," Mean Value = "+meanValue,"",True);
- if( comments != "" )
- fileWrite(sysGlobal1," Comments = "+comments,"",True);
- fileWrite(sysGlobal1," ","",True);
- }
- }
-
- ** If the dialog data is inconsistent for simulation, abort.
- on checkdata
- {
- if (novalue(amplitude))
- abort;
- }
-
-
- ** Initialize any simulation variables.
- on initsim
- {
-
- }
-
-